import datetime
import functools


def log_decorator(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
        print(now)
        print("调用函数:", func.__name__)
        print("传入的参数:", args)
        print("Logging execution of {}".format(func.__name__))
        result = func(*args, **kwargs)
        print("函数的返回结果是：", result)
        return result

    return wrapper


@log_decorator
def new1(names, age):
    print("{} is {} years old.".format(names, age))


aa = new1("liudehua", 30)
print(new1.__name__)
